package com.example.exam.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 考试实体类
 */
public class Exam implements Serializable {
    private static final long serialVersionUID = 1L;
    
    private int examId;           // 考试ID
    private String courseName;    // 课程名称
    private String teacherId;     // 教师ID
    private String teacherName;   // 教师姓名
    private Date startTime;       // 开始时间
    private Date endTime;         // 结束时间
    private int duration;         // 考试时长(分钟)
    private String status;        // 考试状态(未开始、进行中、已结束)
    private String description;   // 考试描述
    
    // 构造方法
    public Exam() {}
    
    public Exam(int examId, String courseName, String teacherId, String teacherName, 
                Date startTime, Date endTime, int duration, String status, String description) {
        this.examId = examId;
        this.courseName = courseName;
        this.teacherId = teacherId;
        this.teacherName = teacherName;
        this.startTime = startTime;
        this.endTime = endTime;
        this.duration = duration;
        this.status = status;
        this.description = description;
    }
    
    // Getters and Setters
    public int getExamId() {
        return examId;
    }
    
    public void setExamId(int examId) {
        this.examId = examId;
    }
    
    public String getCourseName() {
        return courseName;
    }
    
    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }
    
    public String getTeacherId() {
        return teacherId;
    }
    
    public void setTeacherId(String teacherId) {
        this.teacherId = teacherId;
    }
    
    public String getTeacherName() {
        return teacherName;
    }
    
    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }
    
    public Date getStartTime() {
        return startTime;
    }
    
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    
    public Date getEndTime() {
        return endTime;
    }
    
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
    
    public int getDuration() {
        return duration;
    }
    
    public void setDuration(int duration) {
        this.duration = duration;
    }
    
    public String getStatus() {
        return status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    @Override
    public String toString() {
        return "Exam{" +
                "examId=" + examId +
                ", courseName='" + courseName + '\'' +
                ", teacherId='" + teacherId + '\'' +
                ", teacherName='" + teacherName + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", duration=" + duration +
                ", status='" + status + '\'' +
                ", description='" + description + '\'' +
                '}';
    }
}    